import request from '@/utils/request'

export function sensor_list(project_id, group, page = 1) {
  return request({
    url: `/admin/sensor_list?project_id=${project_id}&group=${group}&page=${page}`,
    method: 'get'
  })
}
export function sensor_group(project_id) {
  return request({
    url: `/admin/sensor_group?project_id=${project_id}`,
    method: 'get'
  })
}

export function sensor_edit(data) {
  return request({
    url: '/admin/sensor_edit',
    method: 'post',
    data
  })
}

export function sensor_delete(data) {
  return request({
    url: `/admin/sensor_delete/${data.id}`,
    method: 'delete',
    data
  })
}
